﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAL_Class
{
    public class QuangCao
    {
        public string AddNewAdvertise(string name, string content, string position, bool isfrontpage)
        {
            
            NLLDataContext db = new NLLDataContext();
            string result = String.Empty;
            var q = db.sp_AddNewAdvertise(name,content,position,isfrontpage);
            result = "Thêm mới thành công!";
            return result;
        }

        public string DeleteAdvertise(int id)
        {
            NLLDataContext db = new NLLDataContext();
            String result = String.Empty;
            var q = db.sp_DeleteAdvertise(id);
            result = "Xóa thành công!";
            return result;
        }

        public string UpdateAdvertise(int id,string name,string content, string position, bool isfrontpage)
        {
            NLLDataContext db = new NLLDataContext();
            String result = String.Empty;
            var q = db.sp_UpdateAdvertise(id,name, content,position,isfrontpage);
            result = "Chỉnh sửa thành công!";
            return result;
        }
    }
}
